import request from "@/utils/request";

/**
 * 新增救援计划接口
 * @param {*} data
 * @returns
 */
export function addHandleInfo(data) {
    return request({
        url: "/hd/HandleInfo",
        method: "post",
        data: data,
    });
}

/**
 * 修改救援计划名字
 * @param {*} data
 * @returns
 */
export function updateName(data) {
    return request({
        url: "hd/HandleInfo/updateName",
        method: "put",
        data: data,
    });
}

/**
 * 获取救援计划详情
 * @param {*} handleId
 * @returns
 */
export function getHandleInfo(handleId) {
    return request({
        url: "/hd/HandleInfo/" + handleId,
        method: "get",
    });
}

// 根据HandleId获取应急处置总表详细信息
export function getInfoByHandleId(handleId) {
    return request({
        url: "/hd/HandleInfo/getInfoByHandleId/" + handleId,
        method: "get",
    });
}

// 获取已结束的应急处置事件
export function getEndHandleInfoList(query) {
    return request({
        url: "/hd/HandleInfo/selectEndHandleList",
        method: "get",
        params: query,
    });
}
